import 'package:flu_framework/common/widgets/custom_webview_widget.dart';
import 'package:flu_framework/common/widgets/my_app_bar.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';

class XDWebViewPage extends StatefulWidget {

  const XDWebViewPage({
    Key? key,
  }) : super(key: key);

  @override
  State<XDWebViewPage> createState() => _XDWebViewPageState();
}

class _XDWebViewPageState extends State<XDWebViewPage> {
  late String _webHtml;
  late String _title;
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    Map arguments = Get.arguments;
    _webHtml = arguments['webHtml'] ?? '';
    print("_webHtml:$_webHtml");
    _title = arguments['title'] ?? '';
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: MyAppBar(title: _title,),
      body: Column(
        children: [
          Expanded(child: CustomWebViewWidget(_webHtml),)
        ],
      ),
    );
  }
}
